﻿@using KMF.Common
@using KMF.Utility
@using KMF.WebUI.CustomHelpers
@model IEnumerable<ProductByCateTopListPagingDto>

@if (Model.Any())
{
    <div class="same-header">
        sản phẩm cùng loại
    </div>
    <ul class="pSameList ul clearfix">
        @foreach (var item in Model)
        {
            var pLink = Url.Action("Index", "ProductDetail", new { productName = StringUtil.RemoveSpecialCharactersVn(item.Name), productId = item.Id });
            <li>
                <a href="@pLink" title="@item.Name">
                    <img src="@string.Format("{0}", item.ImagePath.ImagePathThumb(60, 55))" width="60" height="55" alt="@item.Name" align="left" />
                    <h5>@item.Name</h5>
                    <p>
                        @if (item.PromotionPrice > 0)
                        {
                            <strong>@item.PromotionPrice.ToString("#,###") đ</strong>
                            <span class="pg-same-priceOld">@item.Price.ToString("#,###") đ</span>
                        }
                        else
                        {
                            <strong>@item.Price.ToString("#,###") đ</strong>
                        }
                    </p>

                </a>
            </li>
        }
        <div class="pd-same-all">
            <a href="@Url.Action("Index", "Category", new { categoryName = StringUtil.RemoveSpecialCharactersVn(ViewBag.CateName), categoryId = ViewBag.CateId })">Xem thêm
            </a>
        </div>
    </ul>
}



